import {
	defineConfig
} from 'vite'
import uni from '@dcloudio/vite-plugin-uni'
import ViteAutoComponents from 'unplugin-vue-components/vite'
import AutoImport from 'unplugin-auto-import/vite'
import path from 'node:path'


export default defineConfig({
	plugins: [
		uni(),
		AutoImport({
			imports: [
				'vue',
				'uni-app'
			]
		}),
		ViteAutoComponents({
			dirs: ['src/components'],
			extensions: ['vue'],
			dts: 'src/types/auto-components.d.ts',
		})
	],
	resolve: {
		alias: {
			'@': path.resolve(__dirname, '/'),
		},
	},
})